import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../views/index.vue'
import indext from '../views/indext.vue'
Vue.use(VueRouter)

  const routes = [
    {
      path: "/login",
      name: "login",
      component: () => import("../views/login/login")
    },
    {
      path: '/',
      redirect: { name: "login" }
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      children: [
        {
          path: "/addProject",
          name: "addProject",
          component: () => import("../views/project/addProject")
        },
        {
          path: "/org", //组织架构
          name: "orgManagement",
          component: () => import("../views/org/orgManagement")
        },
        {
          path: "/studyManagement", //学生管理
          name: "studyManagement",
          component: () => import("../views/org/studyManagement")
        },
        {
          path: "/roleAndAuth", //角色权限
          name: "roleAndAuth",
          component: () => import("../views/org/roleAndAuth")
        },
        {
          path: "/personAuth", //人员授权
          name: "personAuth",
          component: () => import("../views/org/personAuth")
        },
        {
          path: "/systemLog", //系统日志
          name: "systemLog",
          component: () => import("../views/org/systemLog")
        },
        {
          path: "/trainBase", //实训基地
          name: "trainBase",
          component: () => import("../views/trainingRoom/trainBase")
        },
        {
          path: "/building", //建筑
          name: "building",
          component: () => import("../views/trainingRoom/building")
        },
        {
          path: "/trainRoom", //实训室管理
          name: "trainRoom",
          component: () => import("../views/trainingRoom/trainRoom")
        },
        {
          path: "/trainPerformance", //实训室预期绩效
          name: "trainPerformance",
          component: () => import("../views/trainingRoom/trainPerformance")
        },
        {
          path: "/document", //设备档案
          name: "document",
          component: () => import("../views/equipment/document")
        },
        {
          path: "/equipmentAttr", //设备属性
          name: "equipmentAttr",
          component: () => import("../views/equipment/equipmentAttr")
        },
        {
          path: "/batchMaintenanceLog", //设备维保记录
          name: "batchMaintenanceLog",
          component: () => import("../views/equipment/batchMaintenanceLog")
        },
        {
          path: "/equipmentList", //设备预约
          name: "equipmentList",
          component: () => import("../views/equipment/equipmentList")
        },
        {
          path: "/eqArchives", //设备档案
          name: "eqArchives",
          component: () => import("../views/equipment/eqArchives")
        },
        {
          path: "/equipmentListLog", //设备预约
          name: "equipmentListLog",
          component: () => import("../views/equipment/equipmentListLog")
        },
        {
          path: "/listManagement", //设备审批
          name: "listManagement",
          component: () => import("../views/equipment/listManagement")
        },
        {
          path: "/receiveLog", //领用记录
          name: "receiveLog",
          component: () => import("../views/equipment/receiveLog")
        },
        {
          path: "/returnLog", //归还记录
          name: "returnLog",
          component: () => import("../views/equipment/returnLog")
        },
        {
          path: "/borrowLog", //借用情况
          name: "borrowLog",
          component: () => import("../views/equipment/borrowLog")
        },
        {
          path: "/damageLog", //损坏登记
          name: "damageLog",
          component: () => import("../views/equipment/damageLog")
        },
        {
          path: "/maintenance", //设备维修档案
          name: "maintenance",
          component: () => import("../views/equipment/maintenance")
        },
        {
          path: "/appointmentReview", //设备维修档案
          name: "appointmentReview",
          component: () => import("../views/equipment/appointmentReview")
        },
        {
          path: "/batchMaintenance", //设备批量维保
          name: "batchMaintenance",
          component: () => import("../views/equipment/batchMaintenance")
        },
        {
          path: "/scrapDisposal", //报废处置
          name: "scrapDisposal",
          component: () => import("../views/equipment/scrapDisposal")
        },
        {
          path: "/scrapRecord", //报废处置
          name: "scrapRecord",
          component: () => import("../views/equipment/scrapRecord")
        },
        // {
        //   path: "/materialData", //采购入库
        //   name: "materialData",
        //   component: () => import("../views/materialManagement/materialData")
        // },
        // {
        //   path: "/earlyWarning", //耗材预警
        //   name: "earlyWarning",
        //   component: () => import("../views/materialManagement/earlyWarning")
        // },
        // {
        //   path: "/plan", //采购计划
        //   name: "plan",
        //   component: () => import("../views/materialManagement/plan")
        // },
        // {
        //   path: "/approval", //采购审批
        //   name: "approval",
        //   component: () => import("../views/materialManagement/approval")
        // },
        // {
        //   path: "/purchaseRecord", //采购记录
        //   name: "purchaseRecord",
        //   component: () => import("../views/materialManagement/purchaseRecord")
        // },
        // {
        //   path: "/warehousingAudit", //入库审核
        //   name: "warehousingAudit",
        //   component: () => import("../views/materialManagement/warehousingAudit")
        // },
        // {
        //   path: "/consumableItems", //耗材列表
        //   name: "consumableItems",
        //   component: () => import("../views/materialManagement/consumableItems")
        // },
        // {
        //   path: "/consuming", //领用申请
        //   name: "consuming",
        //   component: () => import("../views/materialManagement/consuming")
        // },
        // {
        //   path: "/consumAudit", //领用审批
        //   name: "consumAudit",
        //   component: () => import("../views/materialManagement/consumAudit")
        // },
        // {
        //   path: "/deliveryRecord", //出库记录
        //   name: "deliveryRecord",
        //   component: () => import("../views/materialManagement/deliveryRecord")
        // },
        // {
        //   path: "/scrapApply", //报废申请
        //   name: "scrapApply",
        //   component: () => import("../views/materialManagement/scrapApply")
        // },
        // {
        //   path: "/scrapApprove", //报废审批
        //   name: "scrapApprove",
        //   component: () => import("../views/materialManagement/scrapApprove")
        // },
        // {
        //   path: "/scrapDispose", //报废处理
        //   name: "scrapDispose",
        //   component: () => import("../views/materialManagement/scrapDispose")
        // },
        {
          path: "/questionBank", //题库
          name: "questionBank",
          component: () => import("../views/securityAccess/questionBank")
        },
        {
          path: "/addTestPaper", //试卷
          name: "addTestPaper",
          component: () => import("../views/securityAccess/addTestPaper")
        },
        {
          path: "/testPaper", //试卷
          name: "testPaper",
          component: () => import("../views/securityAccess/testPaper")
        },
        {
          path: "/study", //学习
          name: "study",
          component: () => import("../views/securityAccess/study")
        },
        {
          path: "/evaluation", //测评
          name: "evaluation",
          component: () => import("../views/securityAccess/evaluation")
        },
        {
          path: "/trainPlan", //培训计划
          name: "trainPlan",
          component: () => import("../views/trainManage/trainPlan")
        },
        {
          path: "/trainCount", //培训内容
          name: "trainCount",
          component: () => import("../views/trainManage/trainCount")
        },
        {
          path: "/inspectDay", //日常检查
          name: "inspectDay",
          component: () => import("../views/securityManage/inspectDay")
        },
        {
          path: "/specilInspect", //专项检查
          name: "specilInspect",
          component: () => import("../views/securityManage/specilInspect")
        },
        {
          path: "/changeLog", //整改记录
          name: "changeLog",
          component: () => import("../views/securityManage/changeLog")
        },
        {
          path: "/changeAppflow", //整改审批
          name: "changeAppflow",
          component: () => import("../views/securityManage/changeAppflow")
        },
        {
          path: "/checkS", //7S管理
          name: "checkS",
          component: () => import("../views/baseData/checkS")
        },
        {
          path: "/taskmanage", //检查任务管理
          name: "taskmanage",
          component: () => import("../views/securityManage/taskmanage")
        },
        {
          path: "/qrCode", //二维码管理
          name: "qrCode",
          component: () => import("../views/equipment/qrCode")
        },
        {
          path: "/CurriculumProvision",
          name: "CurriculumProvision",
          component: () => import("../views/project/CurriculumProvision")
        },
        {
          path: "/courseEvaluation",
          name: "courseEvaluation",
          component: () => import("../views/project/courseEvaluation")
        },
        {
          path: "/teacherLog",
          name: "teacherLog",
          component: () => import("../views/project/teacherLog")
        },
        {
          path: "/explorer",
          name: "explorer",
          component: () => import("../views/project/explorer")
        },
        {
          path: "/teacherTask",
          name: "teacherTask",
          component: () => import("../views/project/teacherTask")
        },
        {
          path: "/studentsUpload",
          name: "studentsUpload",
          component: () => import("../views/project/studentsUpload")
        },
        {
          path: "/teachingLearning",
          name: "teachingLearning",
          component: () => import("../views/project/teachingLearning")
        },
        {
          path: "/gradeManagement",
          name: "gradeManagement",
          component: () => import("../views/project/gradeManagement")
        },
        {
          path: "/totalScore",
          name: "totalScore",
          component: () => import("../views/project/totalScore")
        },
        {
          path: "/useRatio",
          name: "useRatio",
          component: () => import("../views/project/useRatio")
        },
        {
          path: "/TeachingStatements",
          name: "TeachingStatements",
          component: () => import("../views/project/TeachingStatements")
        },
        {
          path: "/deviceList",
          name: "deviceList",
          component: () => import("../views/project/deviceList")
        },
        {
          path: "/stadEval",
          name: "stadEval",
          component: () => import("../views/project/stadEval")
        },
        {
          path: "/teacherList",
          name: "teacherList",
          component: () => import("../views/project/teacherList")
        },
        {
          path: "/deviceStanment",
          name: "deviceStanment",
          component: () => import("../views/project/deviceStanment")
        },
        {
          path: "/baseData",
          name: "baseData",
          component: () => import("../views/baseData/baseData")
        },
          //classSchedule课表
        {
          path: "/classSchedule",
          name: "classSchedule",
          component: () => import("../views/classManagement/classSchedule")
        },
        //耗材管理
        {
          path: "/material", 
          name: "material",
          component: () => import("../views/material/material")
        },
        //耗材采购管理
        {
          path: "/materialPurchase", 
          name: "materialPurchase",
          component: () => import("../views/material/materialPurchase")
        },
        //耗材采购审核
        {
          path: "/materialPurchaseExamine", 
          name: "materialPurchaseExamine",
          component: () => import("../views/material/materialPurchaseExamine")
        },
        //耗材入库审核
        {
          path: "/materialPurchaseAddMaterialExamine", 
          name: "materialPurchaseAddMaterialExamine",
          component: () => import("../views/material/materialPurchaseAddMaterialExamine")
        },
        //耗材入库管理
        {
          path: "/addMaterial", 
          name: "addMaterial",
          component: () => import("../views/material/addMaterial")
        },
        //耗材记录管理
        {
          path: "/materialDetailed", 
          name: "materialDetailed",
          component: () => import("../views/material/materialDetailed")
        },
        //耗材领用申请
        {
          path: "/addMaterialReceive", 
          name: "addMaterialReceive",
          component: () => import("../views/material/addMaterialReceive")
        },
        //耗材领用审核
        {
          path: "/materialReceiveExamine", 
          name: "materialReceiveExamine",
          component: () => import("../views/material/materialReceiveExamine")
        },
        //耗材领用管理
        {
          path: "/materialReceive", 
          name: "materialReceive",
          component: () => import("../views/material/materialReceive")
        },
        //耗材报废申请
        {
          path: "/addMaterialScrap", 
          name: "addMaterialScrap",
          component: () => import("../views/material/addMaterialScrap")
        },
        //耗材报废审核
        {
          path: "/materialScrapExamine", 
          name: "materialScrapExamine",
          component: () => import("../views/material/materialScrapExamine")
        },
        //耗材报废管理
        {
          path: "/materialScrap", 
          name: "materialScrap",
          component: () => import("../views/material/materialScrap")
        },
      ]
    },
    {
      path: '/indext',
      name: 'indext',
      component: indext,
      children: [
        {
          path: "/home", //绩效大屏
          name: "home",
          component: () => import("../views/home/home")
        },
      ]
    }
]

const router = new VueRouter({
  routes
})
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}


export default router
